@import "~scss/variables";

.sw-product-media-form {
    height: 100%;

    .sw-product-media-form__previews {
        border-radius: $border-radius-default;
        border: 1px solid $color-gray-300;
        padding: 20px;
        margin-top: 20px;
        height: auto;
        position: relative;
        overflow: hidden;
        display: grid;
        grid-template-columns: 175px 1fr;
        grid-gap: 12px;

        .preview-cover {
            width: 175px;
            text-align: center;
        }
    }

    .sw-product-media-form__file-input {
        display: none;
    }

    .sw-product-media-form__upload-button {
        display: block;
        margin: 0 auto 20px;
    }

    .sw-product-media-form__grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        grid-gap: 10px;
        grid-auto-flow: dense;
    }

    .sw-product-media-form__cover-image {
        position: relative;
        height: 175px;
        max-height: 100%;
        max-width: 100%;
        color: $color-gray-300;
        overflow: hidden;
        margin-bottom: 10px;

        &::after {
            content: "";
            padding-top: 50%;
        }

        .sw-media-preview-v2__item {
            position: absolute;
            max-height: 100%;
            max-width: 100%;
        }

        &.is--placeholder {
            border: 2px dashed $color-gray-300;
            display: flex;
            align-items: center;
            justify-content: center;

            &:hover {
                background-color: transparent;
            }
        }
    }

    &.is--disabled {
        .mt-button {
            background-color: $color-gray-100;
            color: lighten($color-darkgray-200, 25%);
        }

        .mt-button--ghost {
            background-color: transparent;
            border-color: lighten($color-shopware-brand-500, 20%);
            color: lighten($color-darkgray-200, 20%);
        }

        .mt-button--primary {
            background: lighten($color-shopware-brand-500, 20%);
            color: lighten($color-darkgray-200, 60%);
        }

        &::after {
            content: "";
            position: absolute;
            z-index: 10;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            border-radius: $border-radius-default;
            mix-blend-mode: multiply;
        }
    }
}
